﻿namespace BM.Tools.WebControls.MForm.Controls.Items
{
    using System.Xml.XPath;

    using Helper;

    /// <summary>
    /// The offspring item that is created from the <see cref="Root" /> definition object
    /// </summary>
    public class RootItem : OffspringsOwnerItem
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RootItem"/> class. 
        /// </summary>
        /// <param name="owner">
        /// The owner.
        /// </param>
        /// <param name="index">
        /// The index.
        /// </param>
        /// <param name="navigator">
        /// The navigator.
        /// </param>
        public RootItem(Root owner, int index, XPathNavigator navigator) : base(owner, index, navigator)
        {
        }        

        /// <summary>
        /// Hides the title control
        /// </summary>
        /// <param name="e">
        /// the event args
        /// </param>
        protected override void OnPreRender(System.EventArgs e)
        {
            base.OnPreRender(e);
            Title.Visible = false;
        }
    }
}